package com.kis.core.util.model;

/**
 * Created by wongloong on 16-5-31.
 */
public class HessianBean {
    private String serverName;
    private String uri;
    private Integer port;
    private String accessPath;
    private Object hessian;
    private Class<?> hessianInterface;

    public Class<?> getHessianInterface() {
        return hessianInterface;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public void setHessianInterface(Class<?> hessianInterface) {
        this.hessianInterface = hessianInterface;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getAccessPath() {
        return accessPath;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public void setAccessPath(String accessPath) {
        this.accessPath = accessPath;
    }

    public Object getHessian() {
        return hessian;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        HessianBean that = (HessianBean) o;

        if (serverName != null ? !serverName.equals(that.serverName) : that.serverName != null) return false;
        if (uri != null ? !uri.equals(that.uri) : that.uri != null) return false;
        if (port != null ? !port.equals(that.port) : that.port != null) return false;
        if (accessPath != null ? !accessPath.equals(that.accessPath) : that.accessPath != null) return false;
        if (hessian != null ? !hessian.equals(that.hessian) : that.hessian != null) return false;
        return hessianInterface != null ? hessianInterface.equals(that.hessianInterface) : that.hessianInterface == null;

    }

    @Override
    public int hashCode() {
        int result = serverName != null ? serverName.hashCode() : 0;
        result = 31 * result + (uri != null ? uri.hashCode() : 0);
        result = 31 * result + (port != null ? port.hashCode() : 0);
        result = 31 * result + (accessPath != null ? accessPath.hashCode() : 0);
        result = 31 * result + (hessianInterface != null ? hessianInterface.hashCode() : 0);
        return result;
    }

    public void setHessian(Object hessian) {
        this.hessian = hessian;
    }
}
